﻿@model Proggy.Data.Entities.TrashedNode
@{
    ViewBag.Title = "Restore \"" + Model.Name + "\"";

    // add js
    Html.AddToBackEndContent("~/Areas/Proggy/Content/Scripts/Proggy.ContentEdit.js", BackEndContentType.JavaScript);

}
<h2>@ViewBag.Title</h2>
<div class="proggy-form-div">
    <h3>
        Note: this content will be restored to the <u>root</u> of the site as draft content.
        You can <u>edit and move</u> it once successfully restored. An error may occur if
        this content no longer fits into the current available content types.</h3>
</div>
<div class="proggy-form-div" style="margin-top: 1em; padding-top: 2em;">
    @using (Html.BeginForm())
    {
        
        @Html.ValidationSummary(false)
        <p>
            @Html.LabelFor(m => m.Name)
            @Html.TextBoxFor(m => m.Name, new { @class = "proggy-textbox proggy-textbox-wide" })
        </p>
        <p>
            @Html.LabelFor(m => m.UrlPortion)
            @Html.TextBoxFor(m => m.UrlPortion, new { @class = "proggy-textbox proggy-textbox-wide", maxlength = "50" })
        </p>
        
        <p>
            @Html.LabelFor(m => m.UniqueAlias)
            @Html.TextBoxFor(m => m.UniqueAlias, new { @class = "proggy-textbox proggy-textbox-wide" })
        </p>
        <div style="display: none;">
            @Html.EditorForModel()
        </div>
        <p>
            <input type="submit" value="Restore" class="proggy-button-go" />
            |
            @Html.ActionLink("Cancel", "Index", new { success = 5 }, new { @class = "proggy-button-stop" })
        </p>
    }
</div>
<script type="text/javascript">
    jQuery(function () {
        var editor = new Proggy.ContentEdit();
        editor.CheckForValidationErrors();
        editor.BindUrlSlug();
        editor.BindUppercaseAliasInput();
    });
    </script>
